<template>
	<view>
		<!-- 头部 -->
		<view class="title">
			<view class="title-big">VIP会员</view>
			<view>
				<scroll-view class="scroll-view_H" scroll-x="true" @click="add">
					<view id="demo1" :class="{'scroll-view-item_H':true,'active':bigName=='demo1'}">推荐</view>
					<view id="demo2" :class="{'scroll-view-item_H':true,'active':bigName=='demo2'}">免费体验</view>
					<view id="demo3" :class="{'scroll-view-item_H':true,'active':bigName=='demo3'}">小白入门</view>
					<view id="demo4" :class="{'scroll-view-item_H':true,'active':bigName=='demo4'}">快手菜</view>
					<view id="demo5" :class="{'scroll-view-item_H':true,'active':bigName=='demo5'}">家常菜</view>
					<view id="demo6" :class="{'scroll-view-item_H':true,'active':bigName=='demo6'}">面食</view>
					<view id="demo7" :class="{'scroll-view-item_H':true,'active':bigName=='demo7'}">川湘菜</view>
					<view id="demo8" :class="{'scroll-view-item_H':true,'active':bigName=='demo8'}">凉菜</view>
				</scroll-view>
			</view>
		</view>
		<!-- 会员卡 -->
		<view class="vipCard">
			<view class="top">
				<view class="left">
					<image src="../../static/img/zu428@2x.png" mode=""></image>
				</view>
				<view class="right">
					<view class="cardMessage">
						<view class="message-left">
							欢迎你，新朋友
						</view>
						<view class="message-right">
							开通
						</view>
					</view>
					<view class="cardText">
						8元开通VIP，畅学明初独家菜谱
					</view>
				</view>
			</view>
			<view class="bottom">
				<view class="carditem">
					<image src="/static/img/mengbanzu254@2x.png" mode=""></image>
					<text>名厨课堂</text>
				</view>
				<view class="carditem">
					<image src="/static/img/mengbanzu255@2x.png" mode=""></image>
					<text>无广告打扰</text>
				</view>
				<view class="carditem">
					<image src="/static/img/mengbanzu256@2x.png" mode=""></image>
					<text>身份表示</text>
				</view>
			</view>
		</view>
		<!-- 内容 -->
		<VipData></VipData>
	</view>
</template>

<script>
	import VipData from "../../component/vipData.vue"
	export default {
		data() {
			return {
			bigName:'demo1'
			};
		},
		components:{
			VipData
		},
		methods:{
			add(e){
				
				this.bigName=e.target.id
			}
		}
	}
</script>

<style lang="scss" scoped>
	.title {
		width: 100%;
		height: 220rpx;
		background: url("../../static/img/ditu.png");
		background-size: cover;
		padding: 60rpx 0 0 32rpx;
		box-sizing: border-box;

		.title-big {
			color: white;
			font-size: 30rpx;
			text-align: center;
			line-height: 102rpx;
		}

		.title-small {
			color: white;
			font-size: 25rpx;
		}
	}

	.scroll-Y {
		height: 300rpx;
	}

	.scroll-view_H {
		white-space: nowrap;
		width: 100%;
	}

	

	.scroll-view-item_H {
		display: inline-block;
		// width: 100%;
		// height: 300rpx;
		// line-height: 300rpx;
		// text-align: center;
		font-size: 36rpx;
		margin-right: 88rpx;
		color: white;
		
	}
	.active{
		font-size: 48rpx;
	}
	.vipCard{
		width: 686rpx;
		height: 324rpx;
		margin: 14rpx auto;
		
		background: url("http://m.qpic.cn/psc?/V12TtVFk31bTYX/ruAMsa53pVQWN7FLK88i5i9O6x7Kh1Tt96nYr7WOuXabwqHgMbK*RZmfg.iPQ6UVWmS01qR18O.r7uKhoHTQdxVj3V0GeSJ*.DYLffLcgIU!/b&bo=rgJEAQAAAAADB8s!&rf=viewer_4") no-repeat;
		background-size: contain;
		.top{
			display: flex;
			padding: 32rpx;
			box-sizing: border-box;
			margin-bottom: 36rpx;
			.left{
				width: 128rpx;
				height: 128rpx;
				margin-right: 18rpx;
				image{
					width: 100%;
					height: 100%;
				}
			}
			.right{
				.cardMessage{
					display: flex;
					margin-bottom: 20rpx;
					.message-left{
						color: gray;
						font-size: 24rpx;
						margin-right: 200rpx;
					}
					.message-right{
						height: 34rpx;
						width: 108rpx;
						background: url("../../static/img/juxing221@2x.png") no-repeat;
						background-size: contain;
						font-size: 28rpx;
						text-align: center;
						line-height: 34rpx;
					}
				}
				.cardText{
					color: white;
					font-size: 32rpx;
				}
			}
		}
		.bottom{
			width: 100%;
			height: 96rpx;
			background: url("../../static/img/juxing238@2x.png") no-repeat;
			display: grid;
			grid-template-columns: repeat(3,1fr);
			gap: 10rpx;
			.carditem{
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				image{
					width: 40rpx;
					height: 40rpx;
					margin-bottom: 6rpx;
				}
				text{
					font-size: 24rpx;
					color: #ECC5A9;
				}
			}
		}
	}
</style>
